We should not panic the domain for an EINVAL return from the ioremap
hyerpcall. This was only meant for ENOSYS. Long term this is probably
not the best place for this kind of sanity checking.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
unsigned long ret = ioaddr;
if (running_on_xen) {
ret = __HYPERVISOR_ioremap(ioaddr, size);
- if (unlikely(IS_ERR_VALUE(ret)))
+ if (unlikely(ret == -ENOSYS))
panic("hypercall %s failed with %ld. "
"Please check Xen and Linux config mismatch\n",
__func__, -ret);
+ else if (unlikely(IS_ERR_VALUE(ret)))
+ ret = ioaddr;
}
return ret;
}